package es.abredatos.client.view;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasValue;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

import es.abredatos.client.presenter.HomePresenter;

public class HomeView extends Composite implements HomePresenter.Display {

	private Label viewTitle;;
	private TextBox inputBox;
	private Button searchButton;
	private VerticalPanel vPanel;

	public HomeView() {

		viewTitle = new Label(getClass().getName());

		inputBox = new TextBox();

		searchButton = new Button("Buscar");

		vPanel = new VerticalPanel();
		vPanel.add(viewTitle);
		vPanel.add(inputBox);
		vPanel.add(searchButton);

		initWidget(vPanel);
	}

	public HasValue<String> getInput() {
		return inputBox;
	}

	public HasClickHandlers getSearchButton() {
		return searchButton;
	}

}
